<HTML>
<HEAD><TITLE>Enterprise Java Tech Tips, October, 2002</TITLE>
</HEAD>
<BODY>

<h2>Enterprise Java Tech Tips, October, 2002</h2>

<h3>Tip 1: Sending E-Mail</h3>

Use the following form to send email from SendmailServlet. Note that deploying
the servlet to the server, you must set the initialization parameters
<code>mailhost</code> and <code>mailuser</code>, or the servlet will throw
an exception.

<form ACTION="/sendmail" METHOD="POST">
<table border="1" width="75%">

<tr>
<td width="25%">
Email address of sender:
</td>
<td>
<input name="addrfrom" type="text" width="40" maxwidth="80">
</td>
</tr>

<tr>
<td>
Name of sender:
</td>
<td>
<input name="namefrom" type="text" width="40" maxwidth="80">
</td>
</tr>

<tr>
<td>
Email address of recipient:
</td>
<td>
<input name="addrto" type="text" width="40" maxwidth="80">
</td>
</tr>

<tr>
<td>
Name of recipient:
</td>
<td>
<input name="nameto" type="text" width="40" maxwidth="80">
</td>
</tr>

<tr>
<td>
Debug:<br>
Note: if servlet initialization parameter <code>debug</code>
is set, this value is ignored.
</td>
<td>
<input name="debug" type="radio" value="true">On
<input name="debug" type="radio" value="false" checked="1">Off
</td>
</tr>

<tr><td colspan="2">
</td></tr>

<tr><td colspan="2">
<b>Subject:</b>
<input name="subject" type="text" size="50"><br>
<b>Enter message:</b><br>
<textarea name="messagetext" cols="60" rows="5">
</textarea>
</td></tr>

<tr><td colspan="2">
<input type="submit" value="Send email message">
</td></tr>
</table>

</form>

<h3>Tip 2: Servlet XML Transformer</h3>

<ul>
<form ACTION="/ttoct2002/transform" METHOD="POST">
Choose a play:
<p>
<div style="margin-left: 10pt; margin-top: 10pt">
<input name="doc" type="radio" value="com_err.xml" checked="1"> A Comedy of Errors<br>
<input name="doc" type="radio" value="dream.xml">A Midsummer Night's Dream<br>
<input name="doc" type="radio" value="macbeth.xml"> Macbeth<br>
<input name="doc" type="radio" value="tempest.xml"> The Tempest<br>
</div>
<p>
Select a stylesheet:
<p>
<div style="margin-left: 10pt; margin-top: 10pt">
<input name="style" type="radio" value="actors.xsl" checked="1">A list of characters<br>
<input name="style" type="radio" value="acts_and_scenes.xsl">A list of acts and scenes<br>
<input name="style" type="radio" value="actor_lines.xsl">Lines for the character:
<input type="text" name="character" width="40"><br>
<input name="style" type="radio" value="">The entire play as XML<br>
</div>
<p>
<input type="submit">

</form>
</ul>

<hr>
Click <a href="http://developer.java.sun.com/developer/EJTechTips/">here</a> to see the original Tech Tips article.<br>
<p>
Click <a href="htmlsrc/index.html">here</a> to browse the source code
for this month's tips.
</p>
<p>
Click <a href="http://groups.yahoo.com/group/techtipsarchive/">here</a> to
go to the Tech Tips Archive discussion forum.


</BODY>
</HTML>

